from die import Die
from matplotlib import pyplot as plot

# 实例化一个骰子
die = Die()

# 存储每次掷出来的点数
results = []
# 存储掷出的点数的频率
frequencies = []

for roll_num in range(100):
    result = die.roll()
    results.append(result)

for value in range(1, die.num_sides):
    frequency = results.count(value)
    frequencies.append(frequency)

plot.bar(range(1, die.num_sides), frequencies)
plot.show()

